/*
	测试游戏框架而写的第一个接口
 */
package internal

import (
	"bearserver/msg"
	//"fmt"
	"github.com/name5566/leaf/log"
	l "log"
)

func handleHello(args []interface{})(*msg.Response) {
	m := args[0].(*msg.Dispatch)
	response := &msg.Response{Cmd:m.Cmd,Rnum:m.Rnum,Uid:m.Uid}
	//fmt.Println()

	logger, err := log.New("debug", "bearserver/conf", l.LstdFlags)
	if err != nil {
		return response
	}
	//defer logger.Close()

	logger.Debug("will not print")
	name := "sq"
	logger.Release("My name is %v", name)

	log.Export(logger)

	log.Debug("will not print")
	log.Release("My name is %v", name)
	//logger.Close()
	//测试
	//type ColorGroup struct {
	//	ID     int
	//	Name   string
	//}
	//group := ColorGroup{
	//	ID:     1,
	//	Name:   "Reds",
	//}
	//
	//response.Data = group
	return response
}
